package ai.zixing.controller;

import ai.zixing.service.AnalyseService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zixing
 */
@RestController
public class AnalyseController {

    @Resource
    private List<AnalyseService> analyseServiceList;

    @GetMapping("/sayHelloAsync")
    public String sayHello() throws InterruptedException {
        for (AnalyseService analyseService : analyseServiceList) {
            analyseService.analyseHandle(null, null);
            analyseService.analyseHandle(null);
        }
        return "say hello";
    }
}
